import {
	request
} from "@/util/request.js";
import {
	obj2Url,
	addAccessToken
} from "@/util";

export function workOrderDefault(paramsObj) {
	const params = obj2Url(addAccessToken(paramsObj));
	return request("get", "/v2/WorkOrder/Default.aspx?" + params);
}

export function getOrderView(paramsObj) {
	const params = obj2Url(addAccessToken(paramsObj));
	return request("get", "/v2/WorkOrder/My/Order/OrderView.aspx?" + params);
}

export function getOrderReport(paramsObj) {
	const params = obj2Url(addAccessToken(paramsObj));
	return request("get", "/v2/WorkOrder/Report/R001.aspx?" + params);
}


export function getMyOrderList(paramsObj) {
	const params = obj2Url(addAccessToken(paramsObj));
	return request("get", "/v2/WorkOrder/My/Order/OrderList.aspx?" + params);
}

// 我的订单--接单 
export function assConfirm(paramsObj) {
	const params = obj2Url(addAccessToken(paramsObj));
	return request("get", "/v2/WorkOrder/My/Order/AssConfirm.aspx?" + params);
}

// 我的订单--拒绝
export function assReject(paramsObj) {
	const params = obj2Url(addAccessToken(paramsObj));
	return request("get", "/v2/WorkOrder/My/Order/AssReject.aspx?" + params);
}

export function repairDoneInit(paramsObj) {
	const params = obj2Url(addAccessToken(paramsObj));
	return request("get", "/v2/WorkOrder/My/Order/RepairDoneInit.aspx?" + params);
}

export function repairDone(paramsObj) {
	const params = obj2Url(addAccessToken(paramsObj));
	return request("post", "/v2/WorkOrder/My/Order/RepairDone.aspx?" + params);
}

export function repairDoneSave(paramsObj) {
	const params = obj2Url(addAccessToken(paramsObj));
	return request("post", "/v2/WorkOrder/My/Order/RepairDoneSave.aspx?" + params);
}

export function getTimeOutList(paramsObj) {
	const params = obj2Url(addAccessToken(paramsObj));
	return request("get", "/v2/WorkOrder/My/Order/TimeOutList.aspx?" + params);
}

//抢单列表
export function getNewList(paramsObj) {
	const params = obj2Url(addAccessToken(paramsObj));
	return request("get", "/v2/WorkOrder/My/Order/NewList.aspx?" + params);
}

//抢单
export function qiangDan(paramsObj) {
	const params = obj2Url(addAccessToken(paramsObj));
	return request("get", "/v2/WorkOrder/My/Order/QiangDan.aspx?" + params);
}

export function sheetInit(paramsObj) {
	const params = obj2Url(addAccessToken(paramsObj));
	return request("get", "/v2/WorkOrder/Jxc/JxcSheetInit.aspx?" + params);
}

export function sheetWareChange(paramsObj) {
	const params = obj2Url(addAccessToken(paramsObj));
	return request("get", "/v2/WorkOrder/Jxc/WareChange.aspx?" + params);
}

export function sheetProdList(paramsObj) {
	const params = obj2Url(addAccessToken(paramsObj));
	return request("get", "/v2/WorkOrder/Jxc/ProdList.aspx?" + params);
}

export function sheetProdAdd(paramsObj) {
	const params = obj2Url(addAccessToken(paramsObj));
	return request("post", "/v2/WorkOrder/Jxc/ProdAdd.aspx?" + params);
}

export function sheetProdDelete(paramsObj) {
	const params = obj2Url(addAccessToken(paramsObj));
	return request("post", "/v2/WorkOrder/Jxc/ProdDelete.aspx?" + params);
}

export function orderAddInit(paramsObj) {
	const params = obj2Url(addAccessToken(paramsObj));
	return request("post", "/v2/WorkOrder/OrderAddInit.aspx?" + params);
}

export function orderAdd(paramsObj) {
	const params = obj2Url(addAccessToken(paramsObj));
	return request("post", "/v2/WorkOrder/OrderAdd.aspx?" + params);
}

//工单详情
export function getRepairView(paramsObj) {
	const params = obj2Url(addAccessToken(paramsObj));
	return request("post", "/v2/WorkOrder/RepairView.aspx?" + params);
}

//同意退款
export function orderArbitrateAudit(paramsObj) {
	const params = obj2Url(addAccessToken(paramsObj));
	return request("post", "/v2/WorkOrder/ArbitrateAudit.aspx?" + params);
}

// 拒绝退款
export function orderArbitrateEdit(paramsObj) {
	const params = obj2Url(addAccessToken(paramsObj));
	return request("post", "/v2/WorkOrder/ArbitrateEdit.aspx?" + params);
}

//消单
export function orderCancel(paramsObj) {
	const params = obj2Url(addAccessToken(paramsObj));
	return request("post", "/v2/WorkOrder/Cancel.aspx?" + params);
}

//工单审核
export function orderAudit(paramsObj) {
	const params = obj2Url(addAccessToken(paramsObj));
	return request("post", "/v2/WorkOrder/Audit.aspx?" + params);
}

//工单修改
export function orderEdit(paramsObj) {
	const params = obj2Url(addAccessToken(paramsObj));
	return request("post", "/v2/WorkOrder/OrderEdit.aspx?" + params);
}

//工单催一催
export function orderHit(paramsObj) {
	const params = obj2Url(addAccessToken(paramsObj));
	return request("post", "/v2/WorkOrder/Hit.aspx?" + params);
}

//工单转成待安排
export function orderAssToNew(paramsObj) {
	const params = obj2Url(addAccessToken(paramsObj));
	return request("post", "/v2/WorkOrder/AssToNew.aspx?" + params);
}

export function orderRepairPayResult(paramsObj) {
	const params = obj2Url(addAccessToken(paramsObj));
	return request("post", "/v2/Pay/PayResult.aspx?" + params);
}
//工单收款
export function orderRepairPay(paramsObj) {
	const params = obj2Url(addAccessToken(paramsObj));
	return request("post", "/v2/WorkOrder/Pay/WeixinNative.aspx?" + params);
}
//
export function orderAss(paramsObj) {
	const params = obj2Url(addAccessToken(paramsObj));
	return request("post", "/v2/WorkOrder/Ass.aspx?" + params);
}

//工单成本核销
export function orderPaymentCost(paramsObj) {
	const params = obj2Url(addAccessToken(paramsObj));
	return request("post", "/v2/WorkOrder/PaymentCost.aspx?" + params);
}

export function getOrderParam(paramsObj) {
	const params = obj2Url(addAccessToken(paramsObj));
	return request("post", "/v2/WorkOrder/Sys/ParamView.aspx?" + params);
}

export function getBusiStatusList(paramsObj) {
	const params = obj2Url(addAccessToken(paramsObj));
	return request("get", "/v2/WorkOrder/Sys/BusiStatusList.aspx?" + params);
}

export function getRepairTypeList(paramsObj) {
	const params = obj2Url(addAccessToken(paramsObj));
	return request("post", "/v2/WorkOrder/Sys/RepairTypeList.aspx?" + params);
}

export function getOrderSrcList(paramsObj) {
	const params = obj2Url(addAccessToken(paramsObj));
	return request("post", "/v2/WorkOrder/Sys/OrderSrcList.aspx?" + params);
}

export function getRepairCatgList(paramsObj) {
	const params = obj2Url(addAccessToken(paramsObj));
	return request("post", "/v2/WorkOrder/Sys/RepairCatgList.aspx?" + params);
}

export function getWorkOrderList(paramsObj) {
	const params = obj2Url(addAccessToken(paramsObj));
	return request("post", "/v2/WorkOrder/OrderList.aspx?" + params);
}

export function getPublicOrderList(paramsObj) {
	const params = obj2Url(addAccessToken(paramsObj));
	return request("get", "/v2/WorkOrder/Public/OrderList.aspx?" + params);
}

export function PublicOrderAss(paramsObj) {
	const params = obj2Url(addAccessToken(paramsObj));
	return request("get", "/v2/WorkOrder/Public/Ass.aspx?" + params);
}

export function PublicOrderReject(paramsObj) {
	const params = obj2Url(addAccessToken(paramsObj));
	return request("get", "/v2/WorkOrder/Public/Reject.aspx?" + params);
}